package com.ruoyi.distributionPoster.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 分销海报记录对象 wdmd_distribution_poster
 * 
 * @author ruoyi
 * @date 2025-11-21
 */
@Data
public class DistributionPoster extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 海报ID */
    private Long posterId;

    /** 场景ID（小程序/公众号场景值） */
    @Excel(name = "场景ID", readConverterExp = "小=程序/公众号场景值")
    private String sceneId;

    /** 分销员ID */
    @Excel(name = "分销员ID")
    private Long distributorId;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long goodsId;

    /** 规格ID（可空） */
    @Excel(name = "规格ID", readConverterExp = "可=空")
    private Long skuId;

    /** 海报类型：1=商品海报 2=店铺海报 3=个人名片 */
    @Excel(name = "海报类型：1=商品海报 2=店铺海报 3=个人名片")
    private String posterType;

    /** 海报完整图片URL */
    @Excel(name = "海报完整图片URL")
    private String posterUrl;

    /** 二维码URL */
    @Excel(name = "二维码URL")
    private String qrCodeUrl;

    /** 二维码图片数据（Base64编码） */
    @Excel(name = "二维码图片数据")
    private String qrCodeData;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;

    /** 状态（0=有效 1=已过期 2=禁用） */
    @Excel(name = "状态", readConverterExp = "0==有效,1==已过期,2==禁用")
    private String status;

    /** 访问次数 */
    @Excel(name = "访问次数")
    private Long viewCount;

    /** 生成次数 */
    @Excel(name = "生成次数")
    private Long generateCount;

    /** 分享次数 */
    @Excel(name = "分享次数")
    private Long shareCount;

    /** 转化订单数 */
    @Excel(name = "转化订单数")
    private Long conversionCount;

    /** 删除标志（0存在 2删除） */
    private String delFlag;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("posterId", getPosterId())
            .append("sceneId", getSceneId())
            .append("distributorId", getDistributorId())
            .append("goodsId", getGoodsId())
            .append("skuId", getSkuId())
            .append("posterType", getPosterType())
            .append("posterUrl", getPosterUrl())
            .append("qrCodeUrl", getQrCodeUrl())
            .append("qrCodeData", getQrCodeData())
            .append("expireTime", getExpireTime())
            .append("status", getStatus())
            .append("viewCount", getViewCount())
            .append("generateCount", getGenerateCount())
            .append("shareCount", getShareCount())
            .append("conversionCount", getConversionCount())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
